<template>
	<view>
		<view class="cu-list menu-avatar card-menu margin">
			<view class="cu-item">
				<view class="cu-avatar round lg" :style="{ backgroundImage: `url(${userInfo.avatar})` }"></view>
				<view class="content">
					<view class="text-grey">{{userInfo.nickname}}</view>
					<view class="text-df flex">
						{{userInfo.username}}
					</view>
				</view>
			</view>
		</view>
		
		<view class="cu-list menu card-menu margin-top sm-border" >
			<view class="cu-item arrow" @click="gotoPages('/pages/mine/mineInfoEdit')">
				<view class="content">
					<text class="cuIcon-settingsfill text-grey"></text>
					<text class="text-grey">信息修改</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="gotoPages('/pages/mine/feedback/feedback')">
				<view class="content">
					<text class="cuIcon-questionfill text-grey"></text>
					<text class="text-grey">问题反馈</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="gotoPages('/pages/news/docDetail?id=2')">
				<view class="content">
					<text class="cuIcon-creativefill text-grey"></text>
					<text class="text-grey">关于我们</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="gotoPages('/pages/news/helpList?categoryId=1')">
				<view class="content">
					<text class="cuIcon-creativefill text-grey"></text>
					<text class="text-grey">常见问题</text>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import { getUserInfo } from '@/api/ums.js'
	export default {
		data() {
			return {
				userInfo: {
					avatar: "",
					
				},
			}
		},
		onShow() {
			this.getUserInfo();
		},
		methods: {
			getUserInfo() {
				getUserInfo().then(res => {
					this.userInfo = res.data;
				}).catch(() =>{
	
				})
			},
			
			// 页面调整
			gotoPages(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style>

</style>
